package io;

import java.io.File;
import java.io.IOException;

/**
 * @User: vitobo
 * @Date: 2024-08-12
 * @Description: 文件操作
 *
 */
public class IODemo1 {
    public static void main(String[] args) throws IOException {
        File file = new File("f:/test.txt");

        System.out.println(file.getName());
        System.out.println(file.getParent());
        System.out.println(file.getPath());
        // 获取绝对路径
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getCanonicalPath());


    }
}
